The present invention, in some embodiments thereof, relates to a method and a system for data processing and, more particularly, but not exclusively, to a method and a system for deforming a geometric objects in data segments.
During the last years, numerous graphics applications have been developed, for example for image deformation, such as “warping” or “morphing” in which one image gradually transformed into another image. This is accomplished by creating a smooth transitional link between the two images. Some computer programs, for example, use warping to generate an animation sequence using the image transformations. Such an animation might, for example, show a first person's face transforming into a second person's face.
The warping process ought to preserve features associated with each image by mapping the features from a data segment to corresponding features in a target image. In particular, mesh warping warps a first image into a second image using a point-to-point mapping from the first image to the second image. A first lattice (mesh) is superimposed on the first image and second lattice is superimposed on the second image. For each point in the first lattice, a one-to-one correspondence with a corresponding point in the second lattice is defined. Mesh warping is generally described in George Wolberg, Digital Image Warping, IEEE Computer Society Press (1990). Variations on mesh warping include a version in which the user specifies lines on the first image corresponding to lines on the second image. These user-specified lines are used to construct corresponding lattices, which are used to morph the first image into the second image, as described above.
For example U.S. Pat. No. 6,734,851, filed on Apr. 24, 2003, describes a computer-implemented system performs a conformal warp operation using a unique warping function to map a first area to a second area. The first area is defined by a first enclosing contour and the second area is defined by a second enclosing contour. The system defines the first enclosing contour; modifies the first enclosing contour into the second enclosing contour; generates an analytic function to conformally warp the first area into the second area; and performs the conformal warp using the analytic function.
Barycentric coordinates allows inferring continuous data over a domain from discrete or continuous values on the boundary of the domain. Barycentric coordinates are used in a wide range of applications, such as shading, interpolation, parameterization, and, space deformations, see, respectively, Ju T., Schaefer S., Warren J.: Mean value coordinates for closed triangular meshes, ACM Trans. Graph, (Proc. SIGGRAPH), 24, 3 (2005), 561-566, Desbrun M., Meyer M., Alliez P.: Intrinsic parameterizations of surface meshes. Computer Graphics Forum, 21 (2002), 209-218, Schreiner J., Asirvatham A., Praun E., Hoppe H.: Inter-surface mapping, ACM Trans. Graph, (Proc. SIGGRAPH). 23, 3 (2004), 870-877, Joshi P., Meyer M., DeRose T., Green B., Sanocki T.: Harmonic coordinates for character articulation, ACM Trans. Graph, (Proc. SIGGRAPH), 26, 3 (2007), 71, Lipman Y., Kopf J., Cohen-Or D., Levin D.: GPU-assisted positive mean value coordinates for mesh deformations. Proc. Symp. Geometry Processing (2007), pp. 117-123, and Lipman Y., Levin D., Cohen-Or D.: Green coordinates, ACM Trans. Graph, (Proc. SIGGRAPH), 27, 3 (2008), which are incorporated herein by reference.
Traditionally, barycentric coordinates in Rn are defined as the real coefficients of an affine combination of vectors in Rn. As such, they operate identically on each coordinate.